www.gusucode.com > tpframe PHP开发框架 v2.2PHP源码程序 > tpframe PHP开发框架 v2.2/tpframe_v2.2.0618/tpframe_v2.2.0618/data/runtime/temp/489837ed65ab904ebd20e520d3ee6cab.php

    <?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:31:"addon/cms/view/\posts\edit.html";i:1528510118;}*/ ?>
<?php
use tpfcore\Core;
?>
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<!-- Set render engine for 360 browser -->
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- HTML5 shim for IE8 support of HTML5 elements -->
		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js">
			</script>
		<![endif]-->
		<link href="<?php echo $admin_assets_path; ?>/css/theme.min.css" rel="stylesheet">
		<link href="<?php echo $admin_assets_path; ?>/css/simplebootadmin.css" rel="stylesheet">
		<link href="<?php echo $admin_assets_path; ?>/css/default.css" rel="stylesheet" />
		<link href="<?php echo $admin_assets_path; ?>/css/font-awesome.min.css" rel="stylesheet" type="text/css">
		<style>
			.length_3{width: 180px;} form .input-order{margin-bottom: 0px;padding:3px;width:40px;}
			.table-actions{margin-top: 5px; margin-bottom: 5px;padding:0px;} .table-list{margin-bottom:
			0px;}
		</style>
		<!--[if IE 7]>
			<link rel="stylesheet" href="<?php echo $admin_assets_path; ?>/css/font-awesome-ie7.min.css">
		<![endif]-->
		<script type="text/javascript">
			//全局变量
			var GV = {
				WEB_ROOT:"",
				DIMAUB: "/",
				JS_ROOT: "/theme/backend/assets/js/",
				TOKEN: ""
			};
		</script>
		<!-- Le javascript==================================================-
		-> <!-- Placed at the end of the document so the pages load faster -->
		<script src="<?php echo $admin_assets_path; ?>/js/jquery.js"></script>
		<script src="<?php echo $admin_assets_path; ?>/js/wind.js"></script>
		<script src="<?php echo $admin_assets_path; ?>/js/bootstrap.min.js"></script>
		<link href="<?php echo $admin_assets_path; ?>/kindeditor/themes/default/default.css" rel="stylesheet"/>
		<script src="<?php echo $admin_assets_path; ?>/kindeditor/kindeditor-min.js"></script>
		<script>
			var editor;
			KindEditor.ready(function(K) {
				var uploadbutton = K.uploadbutton({
					button : K('#uploadButton')[0],
					fieldName : 'imgFile',
					url : "<?php echo url('cms/posts/upload'); ?>",
					afterUpload : function(data) {
						console.log(data);
						if (data.code === 0) {
							var url = K.formatUrl(data.data[0], 'absolute');
							K('#url').val(url);
							$('#show_thumb').attr('src',url).show();
						} else {
							alert(data.msg);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
					});
					uploadbutton.fileBox.change(function(e) {
					uploadbutton.submit();
				});
			});
		</script>
	</head>
	<body>
		<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="<?php echo url('cms/posts/index'); ?>">文章管理</a></li>
			<li><a href="<?php echo url('cms/posts/add'); ?>">添加文章</a></li>
			<li class="active"><a href="<?php echo url('cms/posts/edit',['parentid'=>$parentid,'cid'=>$id]); ?>">编辑文章</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form" action="">
			<input type="hidden" name="id" value="<?php echo $list[0]->id; ?>" />
			<fieldset>
			<div class=""> 
			<table class="table table-bordered"> 
			<tbody>
			<tr> 
				<th width="80">标题</th> 
				<td> 
					<input type="text" style="width: 400px;" name="title" id="title" value="<?php echo $list[0]->title; ?>" placeholder="请输入标题"> <span class="form-required">*</span> 
				</td> 
			</tr>
			<tr>
				<th>所属分类</th> 
				<td>
					<select name="cateid">
						<option value="0">选择分类</option>
						<?php echo $categorys; ?>
					</select>
				</td> 
			</tr>
			<tr> 
				<th width="80">缩略图</th> 
				<td> 
					<input class="ke-input-text" type="text" id="url" name='thumb' readonly="readonly" value="<?php echo $list[0]->thumb; ?>" /> 
					<input type="button" id="uploadButton" value="上传缩略图" />
					<?php if(empty($list[0]->thumb) || (($list[0]->thumb instanceof \think\Collection || $list[0]->thumb instanceof \think\Paginator ) && $list[0]->thumb->isEmpty())): ?>
					<img src="" style="width:50px;height:50px; display:none;" id="show_thumb"/>
					<?php else: ?>
					<img src="<?php echo $list[0]->thumb; ?>" style="width:50px;height:50px;" id="show_thumb"/>
					<?php endif; ?>
					
					<span class="form-required">*</span>
				</td> 
			</tr>  
			<tr> 
				<th>添加时间</th> 
				<td><input type="text" name="datetime" value="<?php echo date('Y-m-d H:i:s',$list[0]->datetime); ?>" class="js-datetime date"></td> 
			</tr> 
			<tr>
				<th>文章来源</th> 
				<td><input type="text" name="source" value="<?php echo $list[0]->source; ?>" style="width: 280px" placeholder="文章来源"></td> 
			</tr> 
			<tr>
				<th>作者</th> 
				<td><input type="text" name="author" value="<?php echo $list[0]->author; ?>" style="width: 280px" placeholder=""></td> 
			</tr> 
			<tr>
				<th>文章类型</th> 
				<td>
					<select name="type">
						<option value="1" <?php if($list[0]->type == '1'): ?>selected="selected"<?php endif; ?>>社区文章</option>
						<option value="2" <?php if($list[0]->type == '2'): ?>selected="selected"<?php endif; ?>>文档文章</option>
					</select>
				</td> 
			</tr>
			<tr>
				<th>浏览量</th> 
				<td>
					<input type="text" name="view" value="<?php echo $list[0]->view; ?>" style="width:200px" placeholder="">
				</td> 
			</tr>
			<tr>
				<th>是否审核</th> 
				<td>
					<label><input type="radio" name="ischeck" value="1" <?php if($list[0]->ischeck == '1'): ?>checked<?php endif; ?>/> 已审核</label>
					<label><input type="radio" name="ischeck" value="0" <?php if($list[0]->ischeck == '0'): ?>checked<?php endif; ?>/> 未审核</label></td> 
			</tr>
			<tr>
				<th>是否可评论</th> 
				<td><label><input type="radio" name="iscomment" value="1" <?php if($list[0]->iscomment == '1'): ?>checked<?php endif; ?>/> 可评论</label><label><input type="radio" name="iscomment" value="0" <?php if($list[0]->iscomment == '0'): ?>checked<?php endif; ?>/> 不可评论</label></td> 
			</tr> 
			<tr>
				<th>是否置顶</th> 
				<td><label><input type="radio" name="istop" value="1" <?php if($list[0]->istop == '1'): ?>checked<?php endif; ?>/> 置顶</label><label><input type="radio" name="istop" value="0" <?php if($list[0]->istop == '0'): ?>checked<?php endif; ?>/> 不置顶</label></td> 
			</tr>
			<tr>
				<th>是否推荐</th> 
				<td><label><input type="radio" name="isrecommend" value="1" <?php if($list[0]->isrecommend == '1'): ?>checked<?php endif; ?>/> 推荐</label><label><input type="radio" name="isrecommend" value="0" <?php if($list[0]->isrecommend == '0'): ?>checked<?php endif; ?>/> 不推荐</label></td> 
			</tr>
			<tr> 
				<th>内容</th> 
				<td>
					<?php echo Core::hook('ueditor',['name'=>'content','width'=>'100%','height'=>'','toolbars'=>'','default_str'=>$list[0]['content']]); ?>
				</td>
			</tr>  
			</tbody>
			</table> 
			</div>
			</fieldset>
			<div class="form-actions">
				<button class="btn btn-primary js-ajax-button" type="button">确定操作</button>
				<a class="btn" href="javascript:history.back(-1);">返回</a>
			</div>
		</form>
	</div>
	<script src="<?php echo $admin_assets_path; ?>/js/common.js"></script>
</body>
</html>